home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sphigs.lha / SPHIGS / examples / README < prev    next >
Encoding:
Text File  |  1990-11-26  |  3.9 KB  |  104 lines

  1. Two programs are included in this directory for your enjoyment.
  2.  
  3. The first program is included in two versions, the second being a Macintosh
  4. version which includes dialog boxes and help windows --- it was the SPHIGS
  5. tutorial shown at SIGGRAPH '90.
  6.  
  7. ------------------------------------------------------------------------------
  8.  
  9.                    SPHDEMO*.c
  10.  
  11. AUTHOR: D. Sklar
  12.  
  13. To make this program, simply type:  "make PROG=SPHDEMO"
  14.  
  15. This program is an interactive model-viewing system.  A model of a neighborhood
  16. of houses is created and the camera is initialized.  You can change the
  17. camera's position, orientation, and parameters by using keystrokes.  The user
  18. interface is poor, but it is a satisfactory method for getting acquainted with
  19. the SPHIGS camera model.
  20.  
  21. Two images of the model are visible on the screen.  In the larger viewport is a
  22. solid, shaded image that is the (currently) highest-quality image SPHIGS can
  23. produce.  In the smaller viewports are wireframe-raw images produced using
  24. ORTHOGRAPHIC projection; they also show the view volume and the location of the
  25. PRP and VRP.
  26.  
  27. The numeric keys allow you to choose which part of the camera you wish to
  28. modify.  Each time you hit one of these keys, a prompt is sent to the console
  29. (e.g., xterm, hpterm) to remind you which camera part you are 
  30. currently manipulating.
  31.  
  32.     1    change the VRP along the UVN axes 
  33.            (to move the camera relative to current orientation)
  34.     2    change the VRP along the XYZ axes
  35.            (to move the camera relative to World Coordinate system)
  36.     3    change the VPN (to rotate the camera)
  37.     4    change the PRP (to change the focal length)
  38.     5    change the front clipping-plane distance
  39.     6    change the back clipping-plane distance
  40.  
  41.     0     restore the camera to default location, orientation, etc.
  42.  
  43. You manipulate the "camera part" that you have selected, on three axes:
  44.     X (or U)
  45.     Y (or V)
  46.     Z (or N)
  47.  
  48. To manipulate on the X axis, you use "s" for left and "d" for right.
  49.     "s" subtracts            "d" adds
  50.  
  51. To manipulate on the Y axis, you use "e" for up and "x" for down.
  52.     "x" subtracts             "e" adds 
  53.  
  54. To manipulate on the Z axis, you use "+" to move away from the model (towards
  55. positive infinity) and "-" to move into the model.  (The model's vertices all
  56. have negative Z coords.)
  57.     "-" subtracts             "=" adds 
  58.  
  59. Each time you hit one of the above six keys, the camera is moved by STEPSIZE
  60. units or rotated by STEPSIZE degrees.  The default step size is 30
  61. units/degrees, but you can manipulate the step size using the "<" (to decrease
  62. it by 5) and ">" (to increase it by 5) keys.  The current step size is
  63. echoed to the console whenever it is changed.
  64.  
  65. You can restore the camera's attributes to their default values (as they are
  66. when the program starts up) by hitting '0'.  This is a great way to recover if
  67. you've gotten "lost".
  68.  
  69. You can add a chimney to each house by entering a capital "C", and remove it by
  70. entering a lowercase "c".
  71.  
  72. You can eliminate the wireframe orthographic views (and blow up the nicely
  73. renderered view to full window size) by hitting lowercase 'a', and restore all
  74. the views by hitting capital 'A'.
  75.  
  76. You can toggle the larger view between its default lit-flat rendering and
  77. the alternative "high-quality wireframe" by hitting:
  78.     "n"            to set rendering to lit-flat
  79.     "m"            to set rendering to wireframe
  80.  
  81. Input pick correlation is demonstrated by simply clicking the mouse button
  82. anywhere within the main (perspective) viewport.  If you click on any part of a
  83. house, you will see a message reporting which house you picked.
  84.  
  85.  
  86. ------------------------------------------------------------------------------
  87.  
  88.                  robot_anim.c
  89.  
  90. AUTHOR: Atul Butte
  91.  
  92. To make this program, simply type:  "make PROG=robot_anim"
  93.  
  94. To run it, type:  "robot_anim < robot_anim.data"
  95.  
  96. A brief animation of a robot.  Uses SPHIGS' built-in double-buffering mode.
  97.  
  98. When executing, be sure to redirect stdin so the program
  99. can read from the data file: "robot_anim.data"
  100.  
  101. The code for this program is a good example of the use of structure-network
  102. editing for animation purposes.
  103.  
  104.